<template>
	<view class="apps">
		<uv-subsection :list="tablist" :current="current" @change="change"></uv-subsection>
		<uv-empty mode="page" text="暂无数据，期待您的加入" marginTop="300"></uv-empty>
	</view>
</template>

<script>
	let app;
	import * as ww from '@wecom/jssdk'
	export default {
		data() {
			return {
				tablist: [{name: '著名企业'}, {name: '风云人物'}],
				current:0,
				list:[],
			}
		},
		onLoad(opt) {
			if(opt.token){
				uni.setStorageSync('WeApp_token',opt.token);
			}
			app = this;
			ww.register({
				corpId: 'ww5d7b19c3c1ce8e1f',    // 必填，当前用户企业所属企业ID
				jsApiList: ['hideAllNonBaseMenuItem','hideOptionMenu','createWWLoginPanel'],   
				agentId:'1000006',
				getConfigSignature: async function(){
				  const configData = await app.request({
						url: '/auth',
						data:{'agent_id':''}
					})
					//app.alert(JSON.stringify(configData));
					return configData.data;
				},                
				getAgentConfigSignature: async function(){
					const AgentConf = await app.request({
						url: '/auth',
						data:{'agent_id':'1000006'}
					})
					//app.alert(JSON.stringify(AgentConf));
					return AgentConf.data;
				}
			})
			ww.hideAllNonBaseMenuItem();
			ww.hideOptionMenu();
		},
		onReachBottom() {
			
		},
		methods: {
			handle(id){
				uni.navigateTo({
					url:'/pages/detail/detail?id='+id,
				})
			},
			change(e){
				app.current = e;
			}
		}
	}
</script>

<style scoped>
	
</style>
